package com.orange.core.pojo.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 审核状态
 */
@AllArgsConstructor
@Getter
public enum EAudit implements ConvertableEnum {

    AUDITING(0, "审核中"),

    AUDITED(1, "已过审"),

    AUDIT_REJECT(2, "未过审"),
    ;

    private final int value;
    private final String label;

    public static EAudit fromValue(int value) {
        for (EAudit audit : values()) {
            if (audit.getValue() == value) {
                return audit;
            }
        }
        throw new IllegalStateException("审核状态异常");
    }
}
